<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>药师系统</title>
    <link rel="stylesheet" href="../../static/bootstrap/css/bootstrap.min.css" />
    <link rel="stylesheet" href="../../static/css/global.css" />
    <link rel="stylesheet" href="../../static/css/patient.css" />
</head>

<body>
    <!-- 弹窗组件 -->
    <div th:replace="~{reuse/alertBox::alertBox}"></div>
    <!-- 导航栏 -->
    <div th:replace="~{homepageFD::doctorHomeNav}"></div>
    <main class="mainBox" th:fragment="accountChange">
        <!-- content -->
        <div class="container shadow-md-sm">
            <div th:each="record : ${list}" class="border rounded-3 mb-3 p-3 shadow">
                <div>
                    <Strong>诊断结果：</Strong>
                    <span>[[${record.diagnosis}]]</span>
                </div>
                <div>
                    <Strong>治疗方案：</Strong>
                    <span>[[${record.advices}]]</span>
                </div>
                <div>
                    <Strong>所开药物：</Strong>
                    <span>[[${record.prescription}]]</span>
                </div>
                <footer class="text-center">
                    <button class="btn btn-outline-warning">联系医师</button>
                    <button class="btn btn-outline-success" th:onclick="noQuestion([[${record.medicalRecordId}]])">无问题</button>
                </footer>
            </div>
        </div>
    </main>
    <script src="../../static/bootstrap/js/bootstrap.bundle.min.js"></script>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
    <script type="text/javascript">
        const noQuestion = (id) => {
            $.ajax({
                type: "POST",
                url: "/doctor/medicine/doubleCheck",
                data: JSON.stringify(id),
                dataType: "json",
                contentType: "application/json;charset=utf-8",
            })
        }
    </script>
</body>

</html>